<!--
 * @Author: wangming
 * @Date: 2021-05-27 17:52:33
 * @LastEditors: wangming
 * @LastEditTime: 2022-02-07 17:00:02
 * @Description: 业务模型
-->
<template>
  <!--  todo model-->
  <el-form-item prop="processServeId" label="模型服务名称">
    <el-select
      clearable
      v-model="value.__config.processServeId"
      placeholder="默认"
      style="width: 100%"
      @visible-change="changes"
    >
      <el-option
        :value="i.key"
        :label="i.name"
        v-for="(i, index) in processServelist"
        :key="index"
      ></el-option>
    </el-select>
  </el-form-item>
</template>
<script>
import basicmixins from "../../basicmixins";
import { getVirtualdataservicePagelist } from "@/apis/paas/HmVirtualDataServiceController.js";

export default {
  mixins: [basicmixins],
  computed: {},
  data() {
    return {
      processServelist: [], // 流程服务
    };
  },
  async mounted() {
    if (this.value.__config.processServeId) {
      this.changes(true);
    }
  },
  methods: {
    async changes(show) {
      if (show) {
        const res = await getVirtualdataservicePagelist({
          modelCode: this.value.__config.modelCode,
          pageSize: 1000,
          pageNo: 1,
        });
        this.processServelist = res?.data || [];
      } else {
        this.processServelist = [];
      }
    },
  },
};
</script>
<style lang="scss" scoped></style>
